home *** CD-ROM | disk | FTP | other *** search
/ Network CD 2 / Network CD - Volume 2.iso / programs / internet / tcp / ftp / archie132.lha / archie-1.3.2 / src / pmachine.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-05  |  2.3 KB  |  120 lines

  1. /*
  2.  * Miscellaneous system dependencies.
  3.  *
  4.  * I kept the name pmachine.h because it was already in all of the files...this
  5.  * barely resembles the pmachine.h that comes with the real Prospero, tho.
  6.  */
  7.  
  8. #ifdef u3b2
  9. # define USG
  10. # define NOREGEX
  11. # define MAXPATHLEN 1024    /* There's no maxpathlen in any 3b2 .h file.  */
  12. #endif
  13.  
  14. #ifdef hpux
  15. # ifndef bcopy
  16. #  define FUNCS            /* HP/UX 8.0 has the fns.  */
  17. # endif
  18. # define NOREGEX
  19. # define NEED_STRING_H
  20. #endif
  21.  
  22. #if defined(USG) || defined(SYSV)
  23. # define FUNCS
  24. #endif
  25.  
  26. #ifdef ISC
  27. # define FUNCS
  28. # define STRSPN
  29. # define NOREGEX
  30. #endif
  31.  
  32. #ifdef CUTCP
  33. # define FUNCS
  34. # define NOREGEX
  35. # define NEED_STRING_H
  36. # define SELECTARG int
  37. # define MSDOS
  38. #endif
  39.  
  40. #ifdef _AUX_SOURCE
  41. # define AUX
  42. # define NOREGEX
  43. # define NBBY 8    /* Number of bits in a byte.  */
  44. # define long Fd_mask;
  45. # define NFDBITS (sizeof(Fd_mask) * NBBY)    /* bits per mask */
  46. #endif
  47.  
  48. #ifdef OS2
  49. # define NOREGEX
  50. # include <pctcp.h>
  51. #endif
  52. #ifdef MSDOS
  53. # define USG
  54. # define NOREGEX
  55. # include <string.h>
  56. # include <stdlib.h>
  57. #endif
  58.  
  59. #ifdef _AIX
  60. # ifdef u370
  61. #  define FUNCS
  62. # endif /* AIX/370 */
  63. # define _NONSTD_TYPES
  64. # define _BSD_INCLUDES
  65. # define NEED_STRING_H
  66. # define NEED_SELECT_H
  67. # define NEED_TIME_H
  68. #endif
  69.  
  70. /* ==== */
  71. #ifdef FUNCS
  72. # define index        strchr
  73. /* According to mycroft. */
  74. # ifdef _IBMR2
  75. char *strchr();
  76. # endif
  77. # define rindex        strrchr
  78. # ifndef _AUX_SOURCE
  79. #  define bcopy(a,b,n)    memcpy(b,a,n)
  80. #  define bzero(a,n)    memset(a,0,n)
  81. # ifdef _IBMR2
  82. char *memset();
  83. # endif
  84. # endif
  85. #endif
  86.  
  87. #if defined(_IBMR2) || defined(_BULL_SOURCE)
  88. # define NEED_SELECT_H
  89. #endif
  90. #if defined(USG) || defined(UTS)
  91. # define NEED_STRING_H
  92. #endif
  93. #if defined(USG) || defined(UTS) || defined(_AUX_SOURCE)
  94. # define NEED_TIME_H
  95. # ifdef UTS
  96. #  define WANT_BOTH_TIME
  97. # endif
  98. #endif
  99.  
  100. #ifdef VMS
  101. /* Get the system status stuff.  */
  102. # include <ssdef.h>
  103. #endif /* VMS */
  104.  
  105. /*
  106.  * FD_SET: lib/pfs/dirsend.c, user/vget/ftp.c
  107.  */
  108. #ifndef CUTCP
  109.  
  110. #define SELECTARG fd_set
  111. #if !defined(FD_SET) && !defined(VMS) && !defined(NEED_SELECT_H)
  112. #define    FD_SETSIZE    32
  113. #define    FD_SET(n, p)    ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
  114. #define    FD_CLR(n, p)    ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
  115. #define    FD_ISSET(n, p)    ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
  116. #define FD_ZERO(p)    bzero((char *)(p), sizeof(*(p)))
  117. #endif
  118.  
  119. #endif /* not CUTCP */
  120.